package com.itheima.web;

import com.itheima.entity.Result;
import com.itheima.service.RoleUserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/roleUser")
public class RoleUserControlelr {
    @Reference
    private RoleUserService roleUserService;

    @GetMapping("/findUsers/{id}")
    public Result findUsers(@PathVariable("id") Long id){
        return new Result(roleUserService.findUsers(id));
    }


    @GetMapping("/deleteUserIds/{id}")
    public Result deleteUserIds(@PathVariable("id") Long id){
        return new Result(roleUserService.deleteUserIds(id));
    }
}
